package com.ruoyi.ihome.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ihome.mapper.HomeAndFacilityMapper;
import com.ruoyi.ihome.domain.HomeAndFacility;
import com.ruoyi.ihome.service.IHomeAndFacilityService;

/**
 * 房间设施中间表Service业务层处理
 * 
 * @author mage
 * @date 2024-08-14
 */
@Service
public class HomeAndFacilityServiceImpl implements IHomeAndFacilityService 
{
    @Autowired
    private HomeAndFacilityMapper homeAndFacilityMapper;

    /**
     * 查询房间设施中间表
     * 
     * @param id 房间设施中间表主键
     * @return 房间设施中间表
     */
    @Override
    public HomeAndFacility selectHomeAndFacilityById(Long id)
    {
        return homeAndFacilityMapper.selectHomeAndFacilityById(id);
    }

    /**
     * 查询房间设施中间表列表
     * 
     * @param homeAndFacility 房间设施中间表
     * @return 房间设施中间表
     */
    @Override
    public List<HomeAndFacility> selectHomeAndFacilityList(HomeAndFacility homeAndFacility)
    {
        return homeAndFacilityMapper.selectHomeAndFacilityList(homeAndFacility);
    }

    /**
     * 新增房间设施中间表
     * 
     * @param homeAndFacility 房间设施中间表
     * @return 结果
     */
    @Override
    public int insertHomeAndFacility(HomeAndFacility homeAndFacility)
    {
        return homeAndFacilityMapper.insertHomeAndFacility(homeAndFacility);
    }

    /**
     * 修改房间设施中间表
     * 
     * @param homeAndFacility 房间设施中间表
     * @return 结果
     */
    @Override
    public int updateHomeAndFacility(HomeAndFacility homeAndFacility)
    {
        return homeAndFacilityMapper.updateHomeAndFacility(homeAndFacility);
    }

    /**
     * 批量删除房间设施中间表
     * 
     * @param ids 需要删除的房间设施中间表主键
     * @return 结果
     */
    @Override
    public int deleteHomeAndFacilityByIds(Long[] ids)
    {
        return homeAndFacilityMapper.deleteHomeAndFacilityByIds(ids);
    }

    /**
     * 删除房间设施中间表信息
     * 
     * @param id 房间设施中间表主键
     * @return 结果
     */
    @Override
    public int deleteHomeAndFacilityById(Long id)
    {
        return homeAndFacilityMapper.deleteHomeAndFacilityById(id);
    }
}
